package com.pw.study.actors

import akka.actor.{ActorRef, ActorSystem, Props}

/**
 * @Desc: akka小游戏
 * @author: future
 * @since: 2022/5/22-9:53
 */
object ActorGame extends App {

  private val gameApp: ActorSystem = ActorSystem("gameApp")
  private val b: ActorRef = gameApp.actorOf(Props[BActor], "b")
  private val aRef: ActorRef = gameApp.actorOf(Props(new AActor(b)), "a")
  aRef!"start"
}
